<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理中心</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" />
    <link rel="stylesheet" href="/static/css/global.css" />
    <script type="text/javascript" src="/static/layui/layui.js"></script>
</head>
<body>
<form class="layui-form">
    <div class="layui-tab layui-tab-brief main-tab-container" lay-filter="main-tab">
        <ul class="layui-tab-title main-tab-title">
            <li class="main-tab-item">系统设置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题附加字</label>
                       <div class="layui-input-inline input-custom-width">
                        <input type="text" name="title" value="${title}" lay-verify="" autocomplete="off" placeholder="请输入标题附加字" class="layui-input" />
                    </div>
                    <div class="layui-form-mid layui-word-aux">网页标题通常是搜索引擎关注的重点，本附加字设置出现在标题中商城名称后，如有多个关键字，建议用分隔符分隔</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">网站关键词</label>
                    <div class="layui-input-inline input-custom-width">
                        <textarea name="keyword" lay-verify="" autocomplete="off" placeholder="请输入网站关键词" class="layui-textarea">${keyword}</textarea>
                    </div>
                    <div class="layui-form-mid layui-word-aux">Keywords项出现在页面头部的标签中，用于记录本页面的关键字，多个关键字请用分隔符分隔</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">关键词描述</label>
                    <div class="layui-input-inline input-custom-width">
                        <textarea name="description" lay-verify="" autocomplete="off" placeholder="请输入网站关键词描述" class="layui-textarea">${description}</textarea>
                    </div>
                    <div class="layui-form-mid layui-word-aux">Description出现在页面头部的Meta标签中，用于记录本页面的摘要与描述，建议不超过80个字</div>
                </div>
            </div>
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="siteBase">立即提交</button>
            </div>
          </div>
        </div>
    </div>
</form>
<script>
layui.use(['form', 'element', 'upload'], function(){
  var element = layui.element() //Tab的切换功能，切换事件监听等，需要依赖element模块
  ,form = layui.form()
  ,jq = layui.jquery;
  //监听提交
  form.on('submit(siteBase)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000'] //0.2透明度的白色背景
    });
    var param = data.field;
    jq.post('/admin/setting/editSeo', param, function(data){
      if(data.success){
        layer.close(loading);
        layer.msg(data.message, {icon: 1, time: 1000}, function(){
          location.reload();//do something
        });
      }else{
        layer.close(loading);
        layer.msg(data.message, {icon: 2, anim: 6, time: 1000});
      }
    });
    return false;
  });
});
</script>
</body>
</html>